/**
 * 2024/01/01 - 2024/12/31
 **/
package com.snail.starter.validator.annotation;

import com.snail.starter.validator.SnailPhoneValidator;

import javax.validation.Constraint;
import java.lang.annotation.*;

/**
 *
 * @author: (zg)
 * @Date: 2024/12/30 10:37
 * @Version: 1.0.0
 */
@Documented
@Constraint(validatedBy = SnailPhoneValidator.class)
@Target({ElementType.FIELD, ElementType.TYPE})
@Retention(RetentionPolicy.RUNTIME)
public @interface SnailPhone {

    String message() default "手机号格式不正确";

    String regex() default "^1[3-9]\\d{9}$";

    boolean required() default true;

}